package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"work-safety/api/internal/config"
	"work-safety/workrpc/workrpcclient"
)

type ServiceContext struct {
	Config  config.Config
	WorkRpc workrpcclient.Workrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:  c,
		WorkRpc: workrpcclient.NewWorkrpc(zrpc.MustNewClient(c.WorkRpc)),
	}
}
